package net.sunbeta.test.jpa;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

public class PersonManager {

    @PersistenceContext(name = "UserManagement")
    private EntityManager entityManager;

    //@TransactionAttribute()
    public void savePerson(Person p) {
        entityManager.persist(p);
    }

    public Person getPerson(long id) {
        return entityManager.find(Person.class, id);
    }

}
